import { GET_EARTH,GET_SIDER_STATE } from "../action/types";

const initialState = {
    viewer : null,
    collapsed : false,
    rollerLayer : null
};

export default function(state = initialState,action){
    switch ( action.type ) {
        case GET_EARTH:
            return {
                ...state,
                viewer : action.viewer
            };
        case GET_SIDER_STATE:
            return {
                ...state,
                collapsed : !action.collapsed
            };
        default:
            return state
    }
}